import request from '@/axios'
import { PlanType } from './types'

export const getPlanListApi = (params: any) => {
  return request.get<PlanType[]>({ url: '/check/plan', params })
}

export const addPlanApi = (data: any) => {
  return request.post({ url: '/check/plan', data })
}

export const putPlanApi = (data: any) => {
  return request.put({ url: `/check/plan/${data.id}`, data })
}

export const deletePlanApi = (ids: string[] | number[]) => {
  return request.delete({ url: '/check/plan', data: ids })
}
